package com.analysis.server.repository.impl;

import com.analysis.server.mapper.LogTemplateMapper;
import com.analysis.server.model.LogTemplate;
import com.analysis.server.repository.ILogTemplateService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LogTemplateServiceImpl implements ILogTemplateService {

    @Autowired
    private LogTemplateMapper logTemplateMapper;

    public LogTemplate getLogTemplateById(Long id) {
        return logTemplateMapper.findById(id);
    }

    public boolean existsByName(String name) {
        return logTemplateMapper.count() > 0;
    }
}
